﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;
using Domain;

namespace ScotiabankWP7.Forms.Transferencias
{
    public partial class TransfOperacionRelizada : PhoneApplicationPage
    {
        public TransfOperacionRelizada()
        {
            InitializeComponent();
            txtCompraVenta.Text = "TC: Compra = S/. 2.7965 Venta = S/. 2.8035";
            txtFecha.Text = "18/02/2001 18:50:52";
            datosTransaccion();
        }       

        protected override void OnBackKeyPress(System.ComponentModel.CancelEventArgs e)
        {
            PhoneApplicationFrame root = Application.Current.RootVisual as PhoneApplicationFrame;
            root.Navigate(new Uri("/Forms/MenuPanorama.xaml", UriKind.Relative));
            
        }

        private void datosTransaccion()
        {
            List<Transaccion> transaccion = new List<Transaccion>();
            transaccion.Add(new Transaccion("Nro Transacción", "3091262"));
            transaccion.Add(new Transaccion("Fecha Operación", "03/05/2011 23:23:45"));
            transaccion.Add(new Transaccion("Fecha Efectividad", "05/05/2011"));
            transaccion.Add(new Transaccion("Importe Transferido", "S/. 100.00"));
            transaccion.Add(new Transaccion("Cuenta de Cargo", "AHMN: 098-74125896"));
            transaccion.Add(new Transaccion("Cuenta de Abono", "CCMN: 000-4038583"));
            TransaccionList.ItemsSource = transaccion;
        }

        private void btnEnviar_Click(object sender, RoutedEventArgs e)
        {
            PhoneApplicationFrame root = Application.Current.RootVisual as PhoneApplicationFrame;
            root.Navigate(new Uri("/Forms/Mail/EnvioEmail.xaml", UriKind.Relative));
        }
    }
}